import request, { requestOld } from '@/utils/request'
import { batchTask } from '../deviceMonitor/work'

// 查询时段参数列表
export function tmList(query) {
  return request({
    url: '/param/tm/list',
    method: 'get',
    params: query
  })
}

// 召测时段参数
export function tmCall(query) {
  return batchTask({
    newUrl: '/param/tm/call',
    oldUrl: '/ChaobiaoModule/Tparam_tm/GetCheckData',
    meterNos: query.meterNos,
    rooms: query.rooms,
    updateUrl: '/old/refresh/param/tm',
    onItemOver: query.onItemOver
  })
}

// 校对时间参数
export function tmSet(query) {
  return batchTask({
    newUrl: '/param/tm/set',
    oldUrl: '/ChaobiaoModule/Tparam_tm/SubmitParam',
    meterNos: query.meterNos,
    rooms: query.rooms,
    updateUrl: '/old/refresh/param/tm',
    onItemOver: query.onItemOver
  })
}

// 查看
export function tmView(query) {
  return request({
    url: '/param/tm/view',
    method: 'get',
    params: query
  })
}